@extends('admin.layout')

@section('content')
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                类型管理
                <small>类型列表</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li><a href="#">类型管理</a></li>
                <li class="active">类型列表</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">
                        <div class="box-header">
                            <h3 class="box-title">类型列表</h3>
                        </div><!-- /.box-header -->
                        <div class="box-body">
                            @if( session('info') )
                                <div id="jg" class="callout callout-info">
                                <h4>{{ session('info')}}</h4>
                                </div>    
                            @endif
                            <table id="example2" class="table table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th style="text-align:center">ID</th>
                                    <th style="text-align:center">类型名称</th>
									<th style="text-align:center">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($data as $v)
                                <tr>
                                    <td style="text-align:center">{{ $v -> id}}</td>
                                    <td style="text-align:center">{{ $v -> type_name}}</td>
                                    <td style="text-align:center"><a href="{{ url('admin/attribute/index') }}/{{ $v -> id}}">属性列表</a>|<a href="{{ url('admin/type/edit') }}/{{ $v -> id}}">编辑</a>|<a href="{{ url('admin/type/delete') }}/{{ $v -> id}}">删除</a></td>
                                </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div><!-- /.box-body -->
                    </div><!-- /.box -->
                </div><!-- /.col -->
            </div><!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
<script type="text/javascript">
    window.onload = function(){
        setInterval(function(){
            $('#jg').slideUp();
        },3000);
    }

</script>
@endsection